package cqie.personal.frame.bo;

public class GetMenuBO {
    private Integer id;
    private String menuName;
    private String menuFather;
    private String menuAddress;
    private Boolean menuAbandon;
    private Integer pageOff;
    private Integer pageMax;
    private Integer pageNo;
    private Integer menuLevel;

    public Boolean getMenuAbandon() {
        return menuAbandon;
    }

    public void setMenuAbandon(Boolean menuAbandon) {
        this.menuAbandon = menuAbandon;
    }

    public Integer getMenuLevel() {
        return menuLevel;
    }

    public void setMenuLevel(Integer menuLevel) {
        this.menuLevel = menuLevel;
    }

    public GetMenuBO(){
        pageNo = 1;
        pageMax = 5;
        setPageOff();
    }

    public Integer getPageOff() {
        return pageOff;
    }

    private void setPageOff() {
        pageOff = (pageNo-1)*pageMax;
    }

    public Integer getPageMax() {
        return pageMax;
    }

    public void setPageMax(Integer pageMax) {
        if (pageMax>0) {
            this.pageMax = pageMax;
            setPageOff();
        }
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        if(pageNo>0) {
            this.pageNo = pageNo;
            setPageOff();
        }
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        if(!menuName.equals("")) {
            if(!menuName.replace(" ", "") .equals("")) {
                this.menuName = menuName;
            }
        }
    }

    public String getMenuFather() {
        return menuFather;
    }

    public void setMenuFather(String menuFather) {
        if(!menuFather.equals("")) {
            if(!menuFather.replace(" ", "").equals("")) {
                this.menuFather = menuFather;
            }
        }
    }

    public String getMenuAddress() {
        return menuAddress;
    }

    public void setMenuAddress(String menuAddress) {
        if(!menuAddress.equals("")) {
            if(!menuAddress.replace(" ", "").equals("")) {
                this.menuAddress = menuAddress;
            }
        }
    }
}
